const mongoose = require("mongoose");

const goodsSchema = new mongoose.Schema({
    name: String,//名称
    classify: Array,//商品种类
    pet: Array,//适用宠物
    price: String,//价格
    weight: String,//重量
    production: String,//生产日期
    shelfLife: String,//保质期
    producer: String,//产地
    images: Array,
    featured_products:Boolean,//是否为主推商品
    desc: String,//商品描述
    //门店管理员Id
    adminId:{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'adminsModel'
    } ,
    // 所属门店ID
    shopId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'shopsModel'
    }
})

mongoose.model("goodsModel", goodsSchema, "goods");